import { LoginComponent } from "./login/login.component";
import { NgModule } from "@angular/core";
import { RouterModule } from "@angular/router";
import { TestDemoComponent } from "./test-demo/test-demo.component";
import { TestComponentRenderer } from "@angular/core/testing";


export const routes = [
    {
        path:'',
        redirectTo:'login',
        pathMatch:'full'
    },
    {
        path: 'login',
        component: LoginComponent
    },
    {
        path: 'home',
        loadChildren: './core/core.module#CoreModule'
    },
    {
        path: 'test',
        component: TestDemoComponent
    },
    // {
    //     path:'user',
    //     loadChildren:'./user/user.module#UserModule'
    // },
    {
        path:'**',
        // component: LoginComponent // 测试时用
        component: TestDemoComponent // 开发时用
    }
]

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
  })
  export class AppRoutesModule { }